home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
ply15dat.zip
/
ROOM1.PI
< prev
next >
Wrap
Text File
|
1992-09-13
|
1KB
|
29 lines
// Test of environment map. We will be generating the six faces of an
// environment map from <0, 0, 0>. This will then be used as the surface
// of a "reflective" sphere
//
// Polyray input file: Alexander Enzmann
define location <0, 0, 0> // This is where the "reflective" sphere will be
define at_vecs [<1, 0, 0>, <-1, 0, 0>, < 0, 1, 0>, < 0,-1, 0>, < 0, 0,-1>,
< 0, 0, 1>]
define up_vecs [< 0, 1, 0>, < 0, 1, 0>, < 0, 0, 1>, < 0, 0,-1>, < 0, 1, 0>,
< 0, 1, 0>]
// Generate six frames, one for each direction of the overall environment
start_frame 0
end_frame 5
// Each frame generates the view in a specific direction. The vectors
// stored in the arrays "at_vecs", and "up_vecs" turn the camera in such
// a way as to generate image maps correct for using in an environment map.
viewpoint {
from location // From is the center of projection for the environment
at location + at_vecs[frame]
up up_vecs[frame]
angle 90 // 90 degrees in each direction
resolution 64, 64 // Size this according to the size of the object
}
include "room2.pi"